namespace Cos.Core.NHibernate
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    using Cos.Core.Model.Template;
    
    public class OptionDataModel
    {
        public OptionDataModel() {}
        
        public virtual int Id { get; set; }

        public virtual string OptionName { get; set; }

        public virtual int OptionOrder { get; set; }

        public virtual int PartId { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as OptionDataModel;

            return model != null && this.Id == model.Id;
        }

        public override int GetHashCode()
        {
            return this.Id.GetHashCode();
        }
    }
}